<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<title>用户维护</title>
		
		<link rel="stylesheet" type="text/css" href="../css/cm-default.css"  />
		<link rel="stylesheet" type="text/css" href="../ligerUI/skins/Aqua/css/ligerui-all.css" />
		<link rel="stylesheet" type="text/css" href="../ligerUI/skins/ligerui-icons.css" />
		<script src="../js/jquery-min.js" type="text/javascript"></script>
		<script src="../ligerUI/js/ligerui.min.js" type="text/javascript"></script>
		<script src="../js/common.js" type="text/javascript"></script>
		<script src="../js/json2.js" type="text/javascript"></script>
		<script type="text/javascript" src="../js/md5.js"></script>
	<script type="text/javascript">
	var defGrid;
	var defGrid2;
	var userid;

	function toAdd() {
		var param = new Object();
		param.code=$("#code").val();
		param.name = $("#newName").val();
		param.type = $("#newType").val();
		param.uuid_code=$("#newuuid_code").val();
		param.tax_code = $("#newTax_code").val();
		param.of_trade=$("#newOf_trade").val();
		param.legal_body=$("#newLegal_body").val();
		param.credit_level=$("#newCredit_level").val();
		param.bank=$("#newBank").val();
		param.bank_account=$("#newBank_account").val();
		param.link_man=$("#newLink_man").val();
		param.mobile=$("#newMobile").val();
		param.phone=$("#newPhone").val();
		param.fax=$("#newFax").val();
		param.description=$("#newDesc").val();
		param.companyid='0001';
		param.deptid='0001';
		param.busiorgid='0001';
		param.ofregion='0001';
		var data = JSON.stringify(reqObj('a','rbac.add.dict.def.addPartner',JSON.stringify(param)));
		ajaxSubmit("/cmwifi/rbac/cm.do?m=a", data, function(data) {
			if (data) {
				//alert(parseInt(data['status']));
				if (parseInt(data['status']) > 0) {
					$.ligerDialog.success('保存成功', '操作完成', function() {
					addDialog.hide();
					toQuery();
				});
				}  else {
					$.ligerDialog.error('保存失败');
				}
			}
		});
	}
	
    </script>
    <style type="text/css">
        .middle input {
            display: block;width:30px; margin:2px;
        }
    </style>
</head>
<body style="padding:10px"> 
    <div id="new_user_def" style="overflow:hidden;">
    <form name="basic-form" method="post" id="basic_form" class="liger-form" data-validate="{}">
			<div class="lineD" style="margin-bottom:10px;">
				<span class="title l-icon-add">添加往来单位</span>
			</div>
			<div class="lineD">
				<div class="labelD"><label>编号</label></div>
				<div class="dplD"><input type="text" class="s-text txt-def" id="code" /></div>
			</div>
			<div class="lineD">
				<div class="labelD"><label>名称</label></div>
				<div class="dplD"><input type="text" class="s-text txt-def" id="newName" /></div>
			</div>
			<div class="lineD">
				<div class="labelD"><label>单位类型</label></div>
				<div class="dplD"><input type="text" class="s-text txt-def" id="newType" /></div>
			</div>
			<div class="lineD">
				<div class="labelD"><label>组织机构代码证号</label></div>
				<div class="dplD"><input type="text" class="s-text txt-def" id="newuuid_code" /></div>
			</div><div class="lineD">
				<div class="labelD"><label>税号</label></div>
				<div class="dplD"><input type="text" class="s-text txt-def" id="newTax_code" /></div>
			</div><div class="lineD">
				<div class="labelD"><label>所属行业</label></div>
				<div class="dplD"><input type="text" class="s-text txt-def" id="newOf_trade" /></div>
			</div><div class="lineD">
				<div class="labelD"><label>法人代表</label></div>
				<div class="dplD"><input type="text" class="s-text txt-def" id="newLegal_body" /></div>
			</div><div class="lineD">
				<div class="labelD"><label>信用级别</label></div>
				<div class="dplD"><input type="text" class="s-text txt-def" id="newCredit_level" /></div>
			</div><div class="lineD">
				<div class="labelD"><label>开户行</label></div>
				<div class="dplD"><input type="text" class="s-text txt-def" id="newBank" /></div>
			</div><div class="lineD">
				<div class="labelD"><label>银行帐号</label></div>
				<div class="dplD"><input type="text" class="s-text txt-def" id="newBank_account" /></div>
			</div><div class="lineD">
				<div class="labelD"><label>联系人</label></div>
				<div class="dplD"><input type="text" class="s-text txt-def" id="newLink_man" /></div>
			</div><div class="lineD">
				<div class="labelD"><label>手机号</label></div>
				<div class="dplD"><input type="text" class="s-text txt-def" id="newMobile" /></div>
			</div><div class="lineD">
				<div class="labelD"><label>单位电话</label></div>
				<div class="dplD"><input type="text" class="s-text txt-def" id="newPhone" /></div>
			</div>
			<div class="lineD">
				<div class="labelD"><label>单位传真</label></div>
				<div class="dplD"><input type="text" class="s-text txt-def" id="newFax" /></div>
			</div>
			<div class="lineD">
				<div class="labelD"><label>说明</label></div>
				<div class="dplD"><textarea cols="24" rows="5" id="newDesc"></textarea></div>
			</div>
			</form>
			<div class="lineD" style="margin-top:15px;padding-left:30%;">
				<input type="button" value="保存" onclick="toAdd();" />
				<input type="button" value="清空" onclick="toReset('#new_user_def input,select,textarea')" />
			</div>
		</div>
</body>
</html>